﻿
using Microsoft.Graphics.Canvas.Effects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using Windows.UI;

namespace 纸片人.InterfaceFolder
{
    public static class PixelShaderEffectExtend
    {
        /// <summary>
        /// 设置int属性
        /// </summary>
        /// <param name="pse"></param>
        /// <param name="property"></param>
        /// <param name="value"></param>
        public static void  SetInt(this PixelShaderEffect pse, string property, int value)
        {

            pse.Properties[property] = value;
            
        }

        /// <summary>
        /// 设置float属性
        /// </summary>
        /// <param name="pse"></param>
        /// <param name="property"></param>
        /// <param name="value"></param>
        public static void SetFloat(this PixelShaderEffect pse,string property,float value)
        {
            pse.Properties[property] = value;
        }

        /// <summary>
        /// 设置float属性
        /// </summary>
        /// <param name="pse"></param>
        /// <param name="property"></param>
        /// <param name="value"></param>
        public static void SetFloat2(this PixelShaderEffect pse, string property, Vector2 value)
        {
            pse.Properties[property] = value;
        }

        /// <summary>
        /// 设置float属性
        /// </summary>
        /// <param name="pse"></param>
        /// <param name="property"></param>
        /// <param name="value"></param>
        public static void SetFloat3(this PixelShaderEffect pse, string property, Vector3 value)
        {
            pse.Properties[property] = value;
        }

        /// <summary>
        /// 设置float属性
        /// </summary>
        /// <param name="pse"></param>
        /// <param name="property"></param>
        /// <param name="value"></param>
        public static void SetFloat4(this PixelShaderEffect pse, string property, Vector4 value)
        {
            pse.Properties[property] = value;
        }

        /// <summary>
        /// 设置float属性
        /// </summary>
        /// <param name="pse"></param>
        /// <param name="property"></param>
        /// <param name="value"></param>
        public static void SetColor(this PixelShaderEffect pse, string property, Color value)
        {
            pse.Properties[property] = value;
        }

        public static void SetBoolean(this PixelShaderEffect pse,string property,bool value)
        {
            pse.Properties[property]=value;
        }
    }
}
